<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<logic:notPresent name="user" scope="session">
	<logic:redirect href="../createUser.do"></logic:redirect>
</logic:notPresent>

<logic:present name="user" scope="session">

	<c:if test="${sessionScope.user.role != 3}">
		<logic:redirect href="info_pages/not_exist.jsp"></logic:redirect>	
	</c:if>	

<html>
<head>
  <link rel= "stylesheet" type="text/css" href="CSS/register.css" />
  <script type="text/javascript" src="JS/register.js"></script>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <title>Регистрация</title>
</head>

<body>
    <div  class="main" >
    	<html:form action="/pages/register" style="padding: 20px">
            <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                   
            <font color="#D14335">*</font>Имя(ник):<html:text property="name" onkeydown="handle()" onkeyup="handle()" maxlength="20" />&nbsp;&nbsp;(минимум 4 символа)</label><br><br>
            <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <font color="#D14335">*</font>Пароль:<html:password property="password" onkeydown="handle()" onkeyup="handle()" maxlength="60"/>&nbsp;&nbsp;(минимум 4 символа) </label><br><br>
            <label>
            <font color="#D14335">*</font>Повторите пароль:<input type="password" name="repeatPassword"  onkeydown="handle()" onkeyup="handle()" maxlength="40"/></label><br><br>
            <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            Имя:<html:text property="firstName" maxlength="20"/></label><br><br>
            <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            Фамилия:<html:text property="lastName" maxlength="40"/></label><br><br>
            <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            Адрес:<html:text property="address" maxlength="80"/></label><br><br>
            <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            Телефон:<html:text property="telephone" maxlength="20"/></label><br><br>
            <input type="submit" value="Зарегистрироваться" name="login_submit" class="buttonRegister" disabled="disabled" />
        </html:form>
        <div  class="line">

        </div>
        <font color="#D14335">&nbsp;&nbsp;&nbsp;&nbsp;*</font>Обязательные поля
    </div>
</body>

</html>

</logic:present>